package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.oaflow.xirtrade.TOaFlowXirTradeInfo;
import com.glsc.ngateway.common.api.oaflow.dto.xirtrade.TOaFlowXirTradeBaseInfoDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @Author: xc
 * @Desc: domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface TOaFlowXirTradeInfoMapper {
    TOaFlowXirTradeInfoMapper INSTANCE = Mappers.getMapper(TOaFlowXirTradeInfoMapper.class);

    @Mapping(target = "applicantDepart", ignore = true)
    @Mapping(target = "applicantComp", ignore = true)
    @Mapping(target = "title", ignore = true)
    @Mapping(target = "fj", ignore = true)
    @Mapping(target = "changeAmountStr", ignore = true)
    @Mapping(target = "settleFeeRateStr", ignore = true)
    @Mapping(target = "dealerAndApplicant", ignore = true)
    @Mapping(target = "isnextflow", ignore = true)
    TOaFlowXirTradeBaseInfoDto domain2dto(TOaFlowXirTradeInfo domain);

    List<TOaFlowXirTradeBaseInfoDto> domain2dto(List<TOaFlowXirTradeInfo> domain);

    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    @Mapping(target = "fj", ignore = true)
    TOaFlowXirTradeInfo dto2domain(TOaFlowXirTradeBaseInfoDto dto);

    List<TOaFlowXirTradeInfo> dto2domain(List<TOaFlowXirTradeBaseInfoDto> dto);
}
